﻿using System.Collections.Generic;
using Metro.Kashikoi.Service.Common.Entity;
using Metro.Kashikoi.Service.Item.Business;
using Metro.Kashikoi.ServiceContract.Item;

namespace Metro.Kashikoi.Service.Test.Item
{
    class MockVendorFacade : IVendorFacade
    {
        public IUnitOfWork Context { get; private set; }
        public int EntityId { get; private set; }
        public object Entity { get; private set; }

        public void CreateVendor(IUnitOfWork context, Vendor vendor)
        {
            this.Context = context;
            this.Entity = vendor;
        }

        public void UpdateVendor(IUnitOfWork context, Vendor vendor)
        {
            this.Context = context;
            this.Entity = vendor;
        }

        public void DeleteVendor(IUnitOfWork context, int vendorId)
        {
            this.Context = context;
            this.EntityId = vendorId;
        }

        public IList<Vendor> GetAllVendors(IUnitOfWork context)
        {
            this.Context = context;
            return new List<Vendor>();
        }

        public Vendor GetVendor(IUnitOfWork context, int id)
        {
            this.Context = context;
            this.EntityId = id;
            return new Vendor
            {
                Id = id,
            };
        }
    }
}
